import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
import Login from "@/views/Login/index.vue"
import Layout from "@/views/Layout/index.vue"
import AboutUs from "@/views/AboutUs/index.vue"
import ContactUs from "@/views/ContactUs/index.vue"
import NewsCenter from "@/views/NewsCenter/index.vue"
import ConsultingPrices from "@/views/ConsultingPrices/index.vue"
import Home from "@/views/Home/index.vue"

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL), // 加#号
  routes: [
   {
    path: '/',
    component: Layout,
    redirect: 'Home',
    children: [
      {
        path: 'Home',
        component: Home
      },
      {
        path: 'AboutUs',
        component: AboutUs
      },
      {
        path: 'ContactUs',
        component: ContactUs
      },
      {
        path: 'NewsCenter',
        component: NewsCenter
      },
      {
        path: 'ConsultingPrices',
        component: ConsultingPrices
      }
    ]
   },
   {
    path: '/login',
    component: Login
   }
  ],
})

export default router
